<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <link type="text/css" rel="stylesheet" href="__ADMINS__/css/reset.css">
    <link type="text/css" rel="stylesheet" href="__ADMINS__/css/main.css">
<style>
    .dropdown{
        display: inline-block;
        position: relative;
    }
    .dropdown-content{
        display: none;
        position: absolute;
        background-color: #f9f9f9;
       color: #000;
        padding: 12px 16px;

    }
    .dropdown:hover .dropdown-content{
        display: block;
    }

</style>
</head>
<body>
<div class="headerBar">
    <div class="topBar">
        <div class="comWidth">
            <div class="rightArea">
                欢迎来到电子商城！
              <empty name="Think.session.uname">
                  <a href="{:U('User/login')}">[登录]</a><a href="{:U('reg')}">[免费注册]</a>
                 <else/>
                <span>欢迎您,</span>
                  <div class="dropdown">
                      <a href="#">{$Think.session.uname} </a>
                          <div class="dropdown-content">
                              <a href="__CONTROLLER__/myOrder/id/{$Think.session.uid}">我的订单</a>
                              <a href="__CONTROLLER__/changePwd/uname/{$Think.session.uname}">修改密码</a>
                          </div>
                  </div>
                  <a href="{:U('User/logout')}">[退出]</a>
              </empty>
            </div>
        </div>
    </div>
    <div class="logoBar">
        <div class="comWidth">

            <div class="search_box fl">
                <input type="text" class="search_text fl" id="content">
                <input type="button" value="搜 索" class="search_btn fr" onclick="search()">
            </div>
            <div class="shopCar fr">
                <span class="shopText fl">购物车</span>
                <span class="shopNum fl">0</span>
            </div>
        </div>
    </div>
    <div class="navBox">
        <div class="comWidth clearfix">
            <div class="shopClass fl">
                <h3>全部商品分类<i class="shopClass_icon"></i></h3>
                <div class="shopClass_show">
                    <dl class="shopClass_item">
                        <dt><a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a href="#" class="aLink">合约机</a></dt>
                        <dd><a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a></dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt><a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a href="#" class="aLink">合约机</a></dt>
                        <dd><a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a></dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt><a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a href="#" class="aLink">合约机</a></dt>
                        <dd><a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a></dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt><a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a href="#" class="aLink">合约机</a></dt>
                        <dd><a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a></dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt><a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a href="#" class="aLink">合约机</a></dt>
                        <dd><a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a></dd>
                    </dl>
                </div>
            </div>
            <ul class="nav fl">
                <li><a href="#" class="active">数码城</a></li>

                <li><a href="#">团购</a></li>
                <li><a href="#">发现</a></li>
                <li><a href="#">二手特卖</a></li>
                <li><a href="#">名品会</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="banner comWidth clearfix">
    <div class="banner_bar banner_big ">

            <a href="#"><img id="img1"src="__ADMINS__/image/1.jpg" alt="banner"></a>

    </div>
</div>

<foreach name="cate" item="for">
    <notempty name="for.goods">

<div class="shopTit comWidth">
    <span class="icon"></span><h3>{$for.cname}</h3>
    <a href="__CONTROLLER__/more/id/{$for.id}" class="more">更多&gt;&gt;</a>
</div>
<div class="shopList comWidth clearfix">
    <div class="leftArea">
        <div class="banner_bar banner_sm">
            <ul class="imgBox">
                <li><a href="#"><img src="__ADMINS__/image/banner_sm_01.jpg" alt="banner"></a></li>
                <li><a href="#"><img src="__ADMINS__/image/banner_sm_02.jpg" alt="banner"></a></li>
            </ul>
        </div>
    </div>


    <div class="rightArea">
        <div class="shopList_top clearfix">

           <volist name="for['goods']" id="d">

               <if condition="$d.is_show == 1">
            <div class="shop_item">
                <div class="shop_img">
                    <a href="__CONTROLLER__/proDetails/cname/{$for.cname}/id/{$d.id}" target="_blank"><img height="200" width="187" src="{$d.gimg}" alt=""></a>
                </div>
                <h6>{$d.gname|filter=0,30}</h6>
                <p>￥{$d.gscj}</p>
            </div>
               </if>
           </volist>
        </div>

        <div class="shopList_sm clearfix">
            <volist name="for['two']" id="s">
                <if condition="$d.is_show == 1">
            <div class="shopItem_sm">
                <div class="shopItem_smImg">
                    <a href="__CONTROLLER__/proDetails/cname/{$for.cname}/id/{$s.id}" target="_blank"><img width="95" height="95" src="{$s.gimg}" alt=""></a>
                </div>
                <div class="shopItem_text">
                    <h6>{$s.gname|filter=0,30}</h6>
                    <p>￥{$s.gscj}</p>
                </div>
            </div>
                </if>
        </volist>
        </div>
    </div>
</div>

    </notempty>
</foreach>

<div class="hr_25"></div>
<div class="footer">
    <p><a href="#">商城简介</a><i>|</i><a href="#">商城公告</a><i>|</i> <a href="#">招纳贤士</a><i>|</i><a href="#">联系我们</a><i>|</i>客服热线：400-675-1234</p>
    <p>Copyright &copy; 2006 - 2018 版权所有&nbsp;&nbsp;&nbsp;渝ICP备09037834号&nbsp;&nbsp;&nbsp;渝ICP证B1034-8373号&nbsp;&nbsp;&nbsp;某市公安局XX分局备案编号：123456789123</p>
    <p class="web"><a href="#"><img src="__ADMINS__/image/webLogo.jpg" alt="logo"></a><a href="#"><img src="__ADMINS__/image/webLogo.jpg" alt="logo"></a><a href="#"><img src="__ADMINS__/image/webLogo.jpg" alt="logo"></a><a href="#"><img src="__ADMINS__/image/webLogo.jpg" alt="logo"></a></p>
</div>
<script>
    // 当窗口被加载时就触发一个函数
    window.onload = function() {
        // 设置定时
        window.setInterval("changeImg()", 5000);
    }
    var i = 1;
    function changeImg(){
        i++;
        // 获得图片的控制权
        if(i > 4){
            i=1;
        }
        var img1 = document.getElementById("img1");
        img1.src="__ADMINS__/image/" + i + ".jpg";
    }
    function search() {
        var content=document.getElementById('content').value;

    }
</script>
</body>
</html>
